Skip to content

Web-runtime guard for non-Pyodide-compatible toolboxes#297

Merged
milanofthe merged 1 commit into
mainfrom
feature/toolbox-web-guard
May 21, 2026
Merged

Web-runtime guard for non-Pyodide-compatible toolboxes#297
milanofthe merged 1 commit into
mainfrom
feature/toolbox-web-guard

Conversation

@milanofthe
Copy link
Copy Markdown
Member

@milanofthe milanofthe commented May 21, 2026

Summary

The toolbox installer routes through micropip in the web app (Pyodide backend) and through real pip in the standalone/Flask build. micropip can only install pure-Python wheels (or packages Pyodide ships pre-built), so toolboxes with compiled/native dependencies failed in the web app with a raw micropip traceback — no explanation, no way forward.

This adds a graceful guard and an actionable hint.

Changes

  • toolbox/python.ts_pv_install_micropip now catches micropip failures, classifies them, and prefixes the error with PV_INCOMPATIBLE (browser-runtime limitation) or PV_INSTALL_ERROR (genuine failure).
  • toolbox/installer.ts — new reframePyodideInstallError() turns PV_INCOMPATIBLE failures into a clear, multi-line message explaining the Pyodide limitation and pointing users to the standalone pip install pathview desktop app. Genuine errors pass through unchanged.
  • ToolboxManagerDialog.svelte — proactive notice on the trust step, shown only when the Pyodide backend is active, so users know the limitation before installing.

@milanofthe milanofthe merged commit 3ae339a into main May 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant